const mutations = {
	clickicon(state, index) {
		if (state.tabBer.old == undefined) {
			state.tabBer.old = 0
		}else{
			state.tabBer.old = state.tabBer.now
		}
		
		state.tabBer.now = index
		let oldicon = state.tabBer.list[state.tabBer.old].iconPath
		state.tabBer.list[state.tabBer.old].iconPath = state.tabBer.list[state.tabBer.old].selectedIconPath
		state.tabBer.list[state.tabBer.old].selectedIconPath = oldicon

		let nowicon = state.tabBer.list[state.tabBer.now].iconPath
		state.tabBer.list[state.tabBer.now].iconPath = state.tabBer.list[state.tabBer.now].selectedIconPath
		state.tabBer.list[state.tabBer.now].selectedIconPath = nowicon
		
	}
}

export default mutations
